

import LayoutWithSidebar from '@/components/Layout/LayoutWithSidebar';
import LayoutWithoutSidebar from '@/components/Layout/LayoutWithoutSidebar';
import CommonView from '@/components/routerview';
// 薪酬

// 薪酬管理

//当月工资
const MonthlyGenerate = () => import('@/views/payroll/salary/monthly/generate.vue');
const MonthlyDetail = () => import('@/views/payroll/salary/monthly/detail.vue');
const MonthlyCalucate = () => import('@/views/payroll/salary/monthly/calucate.vue');

// 历史工资
const HistoryHome = () => import('@/views/payroll/salary/history/home/index.vue');
const HistoryDetail = () => import('@/views/payroll/salary/history/detail/index.vue');

// 计薪规则

// 薪资组
const RuleGroup = () => import('@/views/payroll/salary/rule/group/index.vue');
const RuleGroupAdd = () => import('@/views/payroll/salary/rule/group/add/index.vue');
// 考勤计薪规则

const Rule = () => import('@/views/payroll/salary/rule/index.vue');
const RuleAttendance = () => import('@/views/payroll/salary/rule/attendance/index.vue');
const RuleAttendanceDetail = () => import('@/views/payroll/salary/rule/attendance/detail/index.vue');
// 计税规则
const RuleTax = () => import('@/views/payroll/salary/rule/tax/index.vue');
const RuleTaxDetail = () => import('@/views/payroll/salary/rule/tax/detail/index.vue');
// 津补贴规则
const RuleAllowance = () => import('@/views/payroll/salary/rule/allowance/index.vue');
const RuleAllowanceAdd = () => import('@/views/payroll/salary/rule/allowance/add/index.vue');


// 薪酬设置
// 工资表模板
const Settings = () => import('@/views/payroll/salary/settings/index.vue');
const SettingsTemplate = () => import('@/views/payroll/salary/settings/template/index.vue');
const SettingsTemplateDetail = () => import('@/views/payroll/salary/settings/template/detail/index.vue');
const SettingsStructure = () => import('@/views/payroll/salary/settings/structure/index.vue');
// 最低工资
const SettingsLowest = () => import('@/views/payroll/salary/settings/lowest/index.vue');
const SettingsLowestDetail = () => import('@/views/payroll/salary/settings/lowest/detail/index.vue');
const SettingsLowestAdd = () => import('@/views/payroll/salary/settings/lowest/add/index.vue');
const SettingsLowestHistory = () => import('@/views/payroll/salary/settings/lowest/history/index.vue');

// 企业设置
const SettingsIndividuation = () => import('@/views/payroll/salary/settings/individuation/index.vue');
// 操作记录
const SettingsLog = () => import('@/views/payroll/salary/settings/log/index.vue');



const payroll = {
  path: '/payroll',
  component: LayoutWithSidebar,
  redirect: "/payroll/salary",
  meta: {
    name: "薪酬"
  },
  children: [
    {
      path: 'salary',
      component: CommonView,
      redirect: "/payroll/salary/monthly",
      meta: {
        name: "薪酬管理"
      },
      children: [
        {
          path: 'monthly',
          component: CommonView,
          redirect: "/payroll/salary/monthly/detail",
          meta: {
            name: "当月工资"
          },
          children: [
            {
              path: 'generate',
              component: MonthlyGenerate,
              meta: {
                name: "生成工资表"
              },
            },
            {
              path: 'detail',
              component: MonthlyDetail,
              meta: {
                name: "详情"
              },
            }
            ,
            {
              path: 'calucate',
              component: MonthlyCalucate,
              meta: {
                name: "核算工资"
              },
            }

          ]
        },
        {
          path: 'history',
          component: CommonView,
          redirect: "/payroll/salary/history/home",
          meta: {
            name: "历史工资"
          },
          children: [
            {
              path: 'home',
              component: HistoryHome,
              meta: {
                name: "历史工资首页"
              },
            },
            {
              path: 'detail',
              component: HistoryDetail,
              meta: {
                name: "历史工资详情"
              },
            },
          ]
        },
        {
          path: 'rule',
          component: Rule,
          redirect: "/payroll/salary/rule/attendance",
          meta: {
            name: "计薪规则"
          },
          children: [
            {
              path: 'group',
              component: RuleGroup,
              meta: {
                name: "薪资组"
              },
              children: [
                {
                  path: 'add',
                  component: RuleGroupAdd,
                  meta: {
                    name: "薪资组-添加"
                  },
                }
              ]
            },
            {
              path: 'attendance',
              component: RuleAttendance,
              meta: {
                name: "考勤计薪规则"
              },
              children: [
                {
                  path: 'detail',
                  component: RuleAttendanceDetail,
                  meta: {
                    name: "考勤计薪规则-详情"
                  },
                }
              ]
            },
            {
              path: 'tax',
              component: RuleTax,
              meta: {
                name: "计税规则"
              },
              children: [
                {
                  path: 'detail',
                  component: RuleTaxDetail,
                  meta: {
                    name: "计税规则-详情"
                  },
                }
              ]
            },
            {
              path: 'allowance',
              component: RuleAllowance,
              meta: {
                name: "津补贴规则"
              },
              children: [
                {
                  path: 'add',
                  component: RuleAllowanceAdd,
                  meta: {
                    name: "津补贴规则-添加"
                  },
                }
              ]
            },
          ]
        },
        {
          path: 'settings',
          component: Settings,
          redirect: "/payroll/salary/settings/template",
          meta: {
            name: "薪酬设置"
          },
          children: [
            {
              path: 'template',
              component: SettingsTemplate,
              meta: {
                name: "工资表模板"
              },
              children: [
                {
                  path: 'detail',
                  component: SettingsTemplateDetail,
                  meta: {
                    name: "工资表模板-详情"
                  },
                },

              ]
            },
            {
              path: 'structure',
              component: SettingsStructure,
              meta: {
                name: "工资表模板-薪酬结构"
              },
            },
            {
              path: 'lowest',
              component: SettingsLowest,
              meta: {
                name: "最低工资"
              },
              children: [
                {
                  path: 'detail',
                  component: SettingsLowestDetail,
                  meta: {
                    name: "最低工资-详情"
                  },
                },
                {
                  path: 'history',
                  component: SettingsLowestHistory,
                  meta: {
                    name: "最低工资-history"
                  },
                },
                {
                  path: 'add',
                  component: SettingsLowestAdd,
                  meta: {
                    name: "最低工资-add"
                  },
                }
              ]
            },
            {
              path: 'individuation',
              component: SettingsIndividuation,
              meta: {
                name: "薪酬设置-企业设置"
              },
            },
            {
              path: 'log',
              component: SettingsLog,
              meta: {
                name: "薪酬设置-操作记录"
              },
            },
          ]
        },

      ]
    },
  ],

}

export default payroll;